﻿using Com.AAS.Toolbox.DataMirror.Server.Event;

namespace Com.AAS.Toolbox.DataMirror.Server.Handler.Impl
{
    class BaseHandlerImpl : BaseHandler
    {
        private EventListener listener = null;

        #region BaseHandler 成员

        public void Register(EventListener listener)
        {
            this.listener = listener;
        }

        #endregion

        protected void OnEventNotie(MonitorEvent e)
        {
            if (this.listener != null)
            {
                this.listener.OnNotice(e);
            }
        }

        #region IDisposable 成员

        public void Dispose()
        {
            this.listener = null;
        }

        #endregion
    }
}
